package top.songxs.yygh.hosp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.songxs.yygh.common.result.R;
import top.songxs.yygh.hosp.service.DepartmentService;
import top.songxs.yygh.vo.hosp.DepartmentVo;

import java.util.List;

@RestController
@RequestMapping("admin/hosp/department")
public class DepartmentController {

    @Autowired
    DepartmentService departmentService;

    @GetMapping("getDeptList/{hoscode}")
    public R getDepartmentList(@PathVariable String hoscode){
        List<DepartmentVo> list = departmentService.getDepartmentList(hoscode);
        return R.ok().data("list",list);
    }
}
